normalize function

38

double Normalize(double val, double valmin, double valmax, double min, double max) 
{
    return (((val - valmin) / (valmax - valmin)) * (max - min)) + min;
}

Comments

Submit
0 Comments